﻿<?php defined('_JEXEC') or die('Restricted access'); ?>

<?php JHTML::_('behavior.tooltip'); ?>

<?php
	$cid = JRequest::getVar( 'cid', array(0) );
	$edit = JRequest::getVar('edit',true);
	$text = intval($edit) ? JText::_( 'Edit' ) : JText::_( 'New' );

	$delete = $this->ob->del;

	$text = $delete ? 'Usunięty' : $text;
	JToolBarHelper::title( 'Maszyna' . ': <small><small>[ '. $text .' ]</small></small>' , 'maszyna.png' );
	JToolBarHelper::pdf();
	
	global $form_edit;
	$form_edit = ( $form_edit == true && $delete == 0 );
	
	$user =& JFactory::getUser();

	$username = $user->get('username');
	$form_edit_dot = ( strtolower($username) == 'eadamiak' ) ? 1:0;

 	if ( $form_edit || $form_edit_dot ) {
		JToolBarHelper::save();
		JToolBarHelper::cancel();
	} else {
		JToolBarHelper::back2();
	}
	
?>

<script language="javascript" type="text/javascript">
	function submitbutton(pressbutton) 
	{
		var form = document.adminForm;
		if (pressbutton == 'cancel') {
			submitform( pressbutton );
			return;
		}

		// do field validation
		if (trim(form.typ.value) == "") {
			alert( "Wybierz typ maszyny!" );
		} else if  (trim(form.mo1.value) == "") {
			alert( "Wybierz nazwę producenta!" );
		} else if  (trim(form.mo2.value) == "") {
			alert( "Wybierz model maszyny!" );
		} else if  (trim(form.mo3.value) == "") {
			alert( "Podaj rok produkcji!" );			
		} else if  (trim(form.mo4.value) == "") {
			alert( "Podaj nr seryjny!" );
		} else if  (trim(form.nri.value) == "") {
			alert( "Podaj numer inwentarzowy!" );
		} else if  (trim(form.mo5.value) == "") {
			alert( "Podaj mo5!" );
		} else if  (trim(form.mo6.value) == "") {
			alert( "Podaj mo6!" );
		} else if  (trim(form.mo7.value) == "") {
			alert( "Podaj mo7!" );
		} else if  (trim(form.mo9.value) == "") {
			alert( "Podaj mo9!" );
		} else if  (trim(form.obiekt.value) == "") {
			alert( "Wybierz nazwę obiektu" );
		} else {
			submitform( pressbutton );
		}
	}
</script>

<form action="index.php" method="post" name="adminForm" autocomplete="off" enctype="multipart/form-data" >
	
	<table align="center">
	<tr><td rowspan="3">
		<fieldset class="adminform">
		<legend><?php echo 'Szczegóły maszyny'; ?></legend>
			<table class="admintable" cellspacing="1">
				<tr>
					<td  class="key">
						<label for="typ">
							<?php echo 'Typ maszyny'; ?>
						</label>
					</td>
					<td>				
						<?php if ( $form_edit ) { 
						    echo $this->lists['typmasz'];
					       } else {  ?>
					       	       <input type="text" name="typ" id="typ" class="inputbox" readonly="readonly" style="width:300px;" value="<?php echo $this->ob->get('typ'); ?>" />
					 <?php } ?>
					</td>
				</tr>
				<tr>
					<td  class="key">
						<label for="mo1">
							<?php echo 'Producent'; ?>
						</label>
					</td>
					<td>				
						<?php if ( $form_edit ) { 
						    echo $this->lists['prod'];
					       } else {  ?>
					       	       <input type="text" name="mo1" id="mo1" class="inputbox" readonly="readonly" style="width:300px;" value="<?php echo $this->ob->get('mo1'); ?>" />
					 <?php } ?>
					</td>
				</tr>
				<tr>
					<td  class="key">
						<label for="mo2">
							<?php echo 'Model'; ?>
						</label>
					</td>
					<td>
						<?php if ( $form_edit ) { 
						    echo $this->lists['mod'];
					       } else {  ?>
					       	       <input type="text" name="mo2" id="mo2" class="inputbox" readonly="readonly" style="width:300px;" value="<?php echo $this->ob->get('mo2'); ?>" />
					 <?php } ?>
					</td>
				</tr>
				<tr>
					<td  class="key">
						<label for="mo3">
							<?php echo 'Rok produkcji'; ?>
						</label>
					</td>
					<td>
					<?php if ( $form_edit ) { ?>
						    <input type="text" name="mo3" id="mo3" class="inputbox" style="width:300px;" value="<?php echo $this->ob->get('mo3'); ?>" />
					<?php } else {  ?>
					       	    <input type="text" name="mo3" id="mo3" class="inputbox" readonly="readonly" style="width:300px;" value="<?php echo $this->ob->get('mo3'); ?>" />
					 <?php } ?>
					</td>
				</tr>
				<tr>
					<td  class="key">
						<label for="mo4">
							<?php echo 'Numer seryjny'; ?>
						</label>
					</td>
					<td>
						<?php if ( $form_edit ) { ?>
						    <input type="text" name="mo4" id="mo4" class="inputbox" style="width:300px;" value="<?php echo $this->ob->get('mo4'); ?>" />
					<?php } else {  ?>
					       	    <input type="text" name="mo4" id="mo4" class="inputbox" readonly="readonly" style="width:300px;" value="<?php echo $this->ob->get('mo4'); ?>" />
					 <?php } ?>
						
					</td>
				</tr>
				<tr>
					<td  class="key">
						<label for="nri">
							<?php echo 'Numer  inwentarzowy'; ?>
						</label>
					</td>
					<td>
						<?php if ( $form_edit ) { ?>
						    <input type="text" name="nri" id="nri" class="inputbox" style="width:300px;" value="<?php echo $this->ob->get('nri'); ?>" />
					<?php } else {  ?>
					       	    <input type="text" name="nri" id="nri" class="inputbox" readonly="readonly" style="width:300px;" value="<?php echo $this->ob->get('nri'); ?>" />
					 <?php } ?>
					
					</td>
				</tr>
				<tr>
					<td  class="key">
						<label for="mo5">
							<?php echo 'Data zakupu'; ?>
						</label>
					</td>
					<td>
					<?php if ( $form_edit ) { ?>
						<?php echo JHTML::_('calendar',$this->ob->get('mo5'),'mo5','mo5'); ?>
					<?php } else {  ?>
						<input type="text" name="mo5" id="mo5" class="inputbox" readonly="readonly" style="width:300px;" value="<?php echo $this->ob->get('mo5'); ?>" />
					 <?php } ?>
					</td>
				</tr>
				<tr>
					<td  class="key">
						<label for="mo6">
							<?php echo 'Numer dokumentu zakupu'; ?>
						</label>
					</td>
					<td>
					<?php if ( $form_edit ) { ?>
						<input type="text" name="mo6" id="mo6" class="inputbox" style="width:300px;" value="<?php echo $this->ob->get('mo6'); ?>" />
					<?php } else {  ?>
						<input type="text" name="mo6" id="mo6" class="inputbox" readonly="readonly" style="width:300px;" value="<?php echo $this->ob->get('mo6'); ?>" />
					 <?php } ?>
					</td>
				</tr>
				<tr>
					<td  class="key">
						<label for="mo7">
							<?php echo 'Kwota zakupu netto'; ?>
						</label>
					</td>
					<td>
					<?php if ( $form_edit ) { ?>
						<input type="text" name="mo7" id="mo7" class="inputbox" style="width:300px;" value="<?php echo $this->ob->get('mo7'); ?>" />
					<?php } else {  ?>
						<input type="text" name="mo7" id="mo7" class="inputbox" readonly="readonly" style="width:300px;" value="<?php echo $this->ob->get('mo7'); ?>" />
					 <?php } ?>
					</td>
				</tr>
				<tr>
					<td  class="key">
						<label for="mo9">
							<?php echo 'Data przyjęcia do eksploatacji'; ?>
						</label>
					</td>
					<td>
					<?php if ( $form_edit ) { ?>
						<?php echo JHTML::_('calendar',$this->ob->get('mo9'),'mo9','mo9'); ?>
					<?php } else {  ?>
						<input type="text" name="mo9" id="mo9" class="inputbox" readonly="readonly" style="width:300px;" value="<?php echo $this->ob->get('mo9'); ?>" />
					 <?php } ?>
					</td>
				</tr>
				<tr>
					<td  class="key">
						<label for="mo10">
							<?php echo 'Numer OT'; ?>
						</label>
					</td>
					<td>
					<?php if ( $form_edit ) { ?>
						<input type="text" name="mo10" id="mo10" class="inputbox" style="width:300px;" value="<?php echo $this->ob->get('mo10'); ?>" />
					<?php } else {  ?>
						<input type="text" name="mo10" id="mo10" class="inputbox" readonly="readonly" style="width:300px;" value="<?php echo $this->ob->get('mo10'); ?>" />
					 <?php } ?>
					</td>
				</tr>
				<tr>
					<td  class="key">
						<label for="mo11">
							<?php echo 'Numer LT'; ?>
						</label>
					</td>
					<td>
					<?php if ( $form_edit ) { ?>
						<input type="text" name="mo11" id="mo11" class="inputbox" style="width:300px;" value="<?php echo $this->ob->get('mo11'); ?>" />
					<?php } else {  ?>
						<input type="text" name="mo11" id="mo11" class="inputbox" readonly="readonly" style="width:300px;" value="<?php echo $this->ob->get('mo11'); ?>" />
					 <?php } ?>
					</td>
				</tr>
				<tr>
					<td  class="key">
						<label for="mo12">
							<?php echo 'Końcowa data gwarancji'; ?>
						</label>
					</td>
					<td>
					<?php if ( $form_edit ) { ?>
						<?php echo JHTML::_('calendar',$this->ob->get('mo12'),'mo12','mo12'); ?>
					<?php } else {  ?>
						<input type="text" name="mo12" id="mo12" class="inputbox" readonly="readonly" style="width:300px;" value="<?php echo $this->ob->get('mo12'); ?>" />
					 <?php } ?>
					</td>
				</tr>
				<tr>
					<td  class="key">
						<label for="mo13">
							<?php echo 'Gwarancja MTU'; ?>
						</label>
					</td>
					<td>
					<?php if ( $form_edit ) { ?>
						<input type="text" name="mo13" id="mo13" class="inputbox" style="width:300px;" value="<?php echo $this->ob->get('mo13'); ?>" />
					<?php } else {  ?>
						<input type="text" name="mo13" id="mo13" class="inputbox" readonly="readonly" style="width:300px;" value="<?php echo $this->ob->get('mo13'); ?>" />
					 <?php } ?>
					</td>
				</tr>
				<tr>
					<td  class="key">
						<label for="uwagi">
							<?php echo 'Dodatkowe adnotacje'; ?>
						</label>
					</td>
					<td>
					<?php if ( $form_edit ) { ?>
						  <textarea class="text_area" cols="60" rows="2"                     style="width:300px; height:40px" id="uwagi" name="uwagi"><?php echo htmlspecialchars($this->ob->get('uwagi')); ?></textarea>
					<?php } else {  ?>
						<input type="text_area" name="uwagi" id="uwagi" class="inputbox" readonly="readonly" style="width:300px;" value="<?php echo $this->ob->get('uwagi'); ?>" />
					 <?php } ?>
					</td>
				</tr>
			</table>
		</fieldset>
		</td>
		<td>
		<fieldset class="adminform">
		<legend><?php echo 'Dotacja'; ?></legend>
			<table class="admintable" cellspacing="1">
				<tr>
					<td  class="key">
						<label for="dotacja">
							<?php echo 'Dotacja'; ?>
						</label>
					</td>
					<td>
					<?php if ( $form_edit  || $form_edit_dot ) { 
					      
						if ($this->ob->get('dotacja'))
					          $checked ='checked="checked"'; 
					      else
						  $disabled = 'disabled="disabled"';
					?>
						<input type="checkbox" name="dotacja" id="dotacja" class="inputbox" <?php echo $checked; ?> value="1" onclick="this.form.elements['date'].disabled = this.form.elements['organ'].disabled = !this.checked" />				
					<?php } else { 
						 echo $this->ob->get('dotacja') ? 'TAK' : 'NIE';
					 } ?>
					</td>
				</tr>
				<tr>
					<td  class="key">
						<label for="date">
							<?php echo 'Data graniczna - końcowa'; ?>
						</label>
					</td>
					<td>
					<?php if ( $form_edit || $form_edit_dot ) { 
						 echo JHTML::_('calendar',$this->ob->get('date'),'date','date','%Y-%m-%d', $disabled); 
					 } else {  ?>
						<input type="text" name="date" id="date" class="inputbox" readonly="readonly" style="width:300px;" value="<?php echo $this->ob->get('date'); ?>" />
					 <?php } ?>
					</td>
				</tr>
				<tr>
					<td  class="key">
						<label for="organ">
							<?php echo 'Organ'; ?>
						</label>
					</td>
					<td>
					<?php if ( $form_edit || $form_edit_dot ) { ?>
						<input type="text" name="organ" id="organ" class="inputbox" <?php echo $disabled; ?> style="width:300px;" value="<?php echo $this->ob->get('organ'); ?>" />
					<?php } else {  ?>
						<input type="text" name="organ" id="organ" class="inputbox" readonly="readonly" style="width:300px;" value="<?php echo $this->ob->get('organ'); ?>" />
					 <?php } ?>
					</td>
				</tr>
			</table>
		</fieldset>
		</td>
		<tr>
		<td>
		<fieldset class="adminform">
		<legend><?php echo 'Własność maszyny'; ?></legend>
			<table class="admintable" cellspacing="1">
				<tr>
					<td  class="key">
						<label for="msw1">
							<?php echo 'Typ własności'; ?>
						</label>
					</td>
					<td>
						<?php if ( $form_edit ) { 
						    echo $this->lists['typwlas'];
					       } else {  ?>
					       	<input type="text" name="msw1" id="msw1" class="inputbox" readonly="readonly" style="width:300px;" value="<?php echo $this->ob->get('msw1'); ?>" />
					       <?php } ?>
					</td>
				</tr>
				<tr>
					<td  class="key">
						<label for="msw2">
							<?php echo 'Numer umowy'; ?>
						</label>
					</td>
					<td>
					<?php if ( $form_edit ) { ?>
						<input type="text" name="msw2" id="msw2" class="inputbox" style="width:300px;" value="<?php echo $this->ob->get('msw2'); ?>" />
					<?php } else {  ?>
						<input type="text" name="msw2" id="msw2" class="inputbox" readonly="readonly" style="width:300px;" value="<?php echo $this->ob->get('msw2'); ?>" />
					 <?php } ?>
					</td>
				</tr>
				<tr>
					<td  class="key">
						<label for="msw3">
							<?php echo 'Umowa od'; ?>
						</label>
					</td>
					<td>
					<?php if ( $form_edit ) { ?>
						<?php echo JHTML::_('calendar',$this->ob->get('msw3'),'msw3','msw3'); ?>
					<?php } else {  ?>
						<input type="text" name="msw3" id="msw3" class="inputbox" readonly="readonly" style="width:300px;" value="<?php echo $this->ob->get('msw3'); ?>" />
					 <?php } ?>
					</td>
				</tr>
				<tr>
					<td  class="key">
						<label for="msw4">
							<?php echo 'Umowa do'; ?>
						</label>
					</td>
					<td>
					<?php if ( $form_edit ) { ?>
						<?php echo JHTML::_('calendar',$this->ob->get('msw4'),'msw4','msw4'); ?>
					<?php } else {  ?>
						<input type="text" name="msw4" id="msw4" class="inputbox" readonly="readonly" style="width:300px;" value="<?php echo $this->ob->get('msw4'); ?>" />
					 <?php } ?>
					</td>
				</tr>
				<tr>
					<td  class="key">
						<label for="msw5">
							<?php echo 'Skan umowy'; ?>
						</label>
					</td>
					<td>
					<?php if ( $form_edit ) { ?>
						<input type="file" name="plik" id="plik" class="inputbox" />
						<a href="<?php echo $this->ob->get('file_path'); ?>" target="_blank"><?php echo $this->ob->get('file_name'); ?></a>
					<?php } else {  ?>
						<input type="text" name="file_name" id="file_name" class="inputbox" readonly="readonly" style="width:300px;" value="<?php echo $this->ob->get('file_name'); ?>" />
					 <?php } ?>
					</td>
				</tr>
				<tr>
					<td  class="key">
						<label for="msw6">
							<?php echo 'Spółka'; ?>
						</label>
					</td>
					<td>
						<?php if ( $form_edit ) { 
						    echo $this->lists['spolkawl'];
					       } else {  ?>
					       	     <input type="text" name="msw6" id="msw6" class="inputbox" readonly="readonly" style="width:300px;" value="<?php echo htmlspecialchars($this->ob->get('msw6')); ?>" />
					 <?php } ?>
					</td>
				</tr>
			</table>
		</fieldset>
		</td>
		<tr>
		<td>
		<fieldset class="adminform">
		<legend><?php echo 'Spółka użytkująca'; ?></legend>
			<table class="admintable" cellspacing="1">
				<tr>
					<td  class="key">
						<label for="spolka">
							<?php echo 'Spółka'; ?>
						</label>
					</td>
					<td>
						<?php if ( $form_edit ) { 
						    echo $this->lists['spolka'];
					       } else {  
					       	    echo htmlspecialchars($this->ob->get('spolka'));
					       } ?>
					</td>
				</tr>
			</table>
		</fieldset>
		</td>
		</tr>
		<tr>
		<td>
		<fieldset class="adminform">
		<legend><?php echo 'Obiekt'; ?></legend>
			<table class="admintable" cellspacing="1">
				<tr>
					<td  class="key">
						<label for="obiekt">
							<?php echo 'Obiekt'; ?>
						</label>
					</td>
					<td>
						<?php if ( $form_edit ) { 
						    echo $this->lists['obiekt'];
					       } else {  
					       	    echo htmlspecialchars($this->ob->get('obiekt'));
					       } ?>
					</td>
				</tr>
			</table>
		</fieldset>
		</td>
		<td>
		<fieldset class="adminform">
		<legend>Wartość początkowa maszyny</legend>
			<table class="admintable" cellspacing="1">
				<tr>
					<td  class="key">
						<label for="na_dzien">
							<?php echo 'Data'; ?>
						</label>
					</td>
					<td>
					<?php if ( $form_edit ) { ?>
						<?php echo JHTML::_('calendar',$this->ob->get('na_dzien'),'na_dzien','na_dzien'); ?>
					<?php } else {  ?>
						<input type="text" name="na_dzien" id="na_dzien" class="inputbox" readonly="readonly" style="width:300px;" value="<?php echo $this->ob->get('na_dzien'); ?>" />
					 <?php } ?>
					</td>
				</tr>
				<tr>
					<td  class="key">
						<label for="wartosc">
							<?php echo 'Wartość'; ?>
						</label>
					</td>
					<td>
					<?php if ( $form_edit ) { ?>
						<input type="text" name="wartosc" id="wartosc" class="inputbox" style="width:300px;" value="<?php echo $this->ob->get('wartosc'); ?>" />
					<?php } else {  ?>
						<input type="text" name="wartosc" id="wartosc" class="inputbox" readonly="readonly" style="width:300px;" value="<?php echo $this->ob->get('wartosc'); ?>" />
					 <?php } ?>
					</td>
				</tr>
			</table>
		</fieldset>
		</td>
		</tr>
		<tr>
		<td>
		<fieldset class="adminform">
		<legend><?php echo 'Akumulator'; ?></legend>
			<table class="admintable" cellspacing="1">
				<tr>
					<td  class="key">
						<label for="msa1">
							<?php echo 'Data montażu'; ?>
						</label>
					</td>
					<td>
					<?php if ( $form_edit ) { ?>
						<?php echo JHTML::_('calendar',$this->ob->get('msa1'),'msa1','msa1'); ?>
					<?php } else {  ?>
						<input type="text" name="msa1" id="msa1" class="inputbox" readonly="readonly" style="width:300px;" value="<?php echo $this->ob->get('msa1'); ?>" />
					 <?php } ?>
					</td>
				</tr>
				<tr>
					<td  class="key">
						<label for="msa2">
							<?php echo 'Typ akumulatora'; ?>
						</label>
					</td>
					<td>
					<?php if ( $form_edit ) { ?>
						<input type="text" name="msa2" id="msa2" class="inputbox" style="width:300px;" value="<?php echo $this->ob->get('msa2'); ?>" />
					<?php } else {  ?>
						<input type="text" name="msa2" id="msa2" class="inputbox" readonly="readonly" style="width:300px;" value="<?php echo $this->ob->get('msa2'); ?>" />
					 <?php } ?>
					</td>
				</tr>
				<tr>
					<td  class="key">
						<label for="msa3">
							<?php echo 'Typ budowy akumulatora'; ?>
						</label>
					</td>
					<td>
					<?php if ( $form_edit ) { ?>
						<input type="text" name="msa3" id="msa3" class="inputbox" style="width:300px;" value="<?php echo $this->ob->get('msa3'); ?>" />
					<?php } else {  ?>
						<input type="text" name="msa3" id="msa3" class="inputbox" readonly="readonly" style="width:300px;" value="<?php echo $this->ob->get('msa3'); ?>" />
					 <?php } ?>
					</td>
				</tr>
				<tr>
					<td  class="key">
						<label for="msa4">
							<?php echo 'Wymiar akumulatora'; ?>
						</label>
					</td>
					<td>
					<?php if ( $form_edit ) { ?>
						<input type="text" name="msa4" id="msa4" class="inputbox" style="width:300px;" value="<?php echo $this->ob->get('msa4'); ?>" />
					<?php } else {  ?>
						<input type="text" name="msa4" id="msa4" class="inputbox" readonly="readonly" style="width:300px;" value="<?php echo $this->ob->get('msa4'); ?>" />
					 <?php } ?>
					</td>
				</tr>
			</table>
		</fieldset>
		</td>
		<td rowspan="2">
		<fieldset class="adminform">
		<legend><?php echo 'Prostownik'; ?></legend>
			<table class="admintable" cellspacing="1">
				<tr>
					<td  class="key">
						<label for="msr1">
							<?php echo 'Data montażu'; ?>
						</label>
					</td>
					<td>
					<?php if ( $form_edit ) { ?>
						<?php echo JHTML::_('calendar',$this->ob->get('msr1'),'msr1','msr1'); ?>
					<?php } else {  ?>
						<input type="text" name="msr1" id="msr1" class="inputbox" readonly="readonly" style="width:300px;" value="<?php echo $this->ob->get('msr1'); ?>" />
					 <?php } ?>
					</td>
				</tr>
				<tr>
					<td  class="key">
						<label for="msr2">
							<?php echo 'Typ prostownika'; ?>
						</label>
					</td>
					<td>
					<?php if ( $form_edit ) { ?>
						<input type="text" name="msr2" id="msr2" class="inputbox" style="width:300px;" value="<?php echo $this->ob->get('msr2'); ?>" />
					<?php } else {  ?>
						<input type="text" name="msr2" id="msr2" class="inputbox" readonly="readonly" style="width:300px;" value="<?php echo $this->ob->get('msr2'); ?>" />
					 <?php } ?>
					</td>
				</tr>
				<tr>
					<td  class="key">
						<label for="msr3">
							<?php echo 'Typ napięcia prostownika'; ?>
						</label>
					</td>
					<td>
					<?php if ( $form_edit ) { ?>
						<input type="text" name="msr3" id="msr3" class="inputbox" style="width:300px;" value="<?php echo $this->ob->get('msr3'); ?>" />
					<?php } else {  ?>
						<input type="text" name="msr3" id="msr3" class="inputbox" readonly="readonly" style="width:300px;" value="<?php echo $this->ob->get('msr3'); ?>" />
					 <?php } ?>
					</td>
				</tr>
				<tr>
					<td  class="key">
						<label for="msr4">
							<?php echo 'Symbol'; ?>
						</label>
					</td>
					<td>
					<?php if ( $form_edit ) { ?>
						<input type="text" name="msr4" id="msr4" class="inputbox" style="width:300px;" value="<?php echo $this->ob->get('msr4'); ?>" />
					<?php } else {  ?>
						<input type="text" name="msr4" id="msr4" class="inputbox" readonly="readonly" style="width:300px;" value="<?php echo $this->ob->get('msr4'); ?>" />
					 <?php } ?>
					</td>
				</tr>
				<tr>
					<td  class="key">
						<label for="msr5">
							<?php echo 'Numer fabryczny'; ?>
						</label>
					</td>
					<td>
					<?php if ( $form_edit ) { ?>
						<input type="text" name="msr5" id="msr5" class="inputbox" style="width:300px;" value="<?php echo $this->ob->get('msr5'); ?>" />
					<?php } else {  ?>
						<input type="text" name="msr5" id="msr5" class="inputbox" readonly="readonly" style="width:300px;" value="<?php echo $this->ob->get('msr5'); ?>" />
					 <?php } ?>
					</td>
				</tr>
			</table>
		</fieldset>
		</td>
		<tr>
		<td>
		<fieldset class="adminform">
		<legend><?php echo 'Ssawa'; ?></legend>
			<table class="admintable" cellspacing="1">
				<tr>
					<td  class="key">
						<label for="msd1">
							<?php echo 'Ssawa przód'; ?>
						</label>
					</td>
					<td>
					<?php if ( $form_edit ) { ?>
						<input type="text" name="msd1" id="msd1" class="inputbox" style="width:300px;" value="<?php echo $this->ob->get('msd1'); ?>" />
					<?php } else {  ?>
						<input type="text" name="msd1" id="msd1" class="inputbox" readonly="readonly" style="width:300px;" value="<?php echo $this->ob->get('msd1'); ?>" />
					 <?php } ?>
					</td>
				</tr>
				<tr>
					<td  class="key">
						<label for="msd2">
							<?php echo 'Ssawa tył'; ?>
						</label>
					</td>
					<td>
					<?php if ( $form_edit ) { ?>
						<input type="text" name="msd2" id="msd2" class="inputbox" style="width:300px;" value="<?php echo $this->ob->get('msd2'); ?>" />
					<?php } else {  ?>
						<input type="text" name="msd2" id="msd2" class="inputbox" readonly="readonly" style="width:300px;" value="<?php echo $this->ob->get('msd2'); ?>" />
					 <?php } ?>
					</td>
				</tr>
				<tr>
					<td  class="key">
						<label for="msd3">
							<?php echo 'Ssawa specjalna przód'; ?>
						</label>
					</td>
					<td>
					<?php if ( $form_edit ) { ?>
						<input type="text" name="msd3" id="msd3" class="inputbox" style="width:300px;" value="<?php echo $this->ob->get('msd3'); ?>" />
					<?php } else {  ?>
						<input type="text" name="msd3" id="msd3" class="inputbox" readonly="readonly" style="width:300px;" value="<?php echo $this->ob->get('msd3'); ?>" />
					 <?php } ?>
					</td>
				</tr>
				<tr>
					<td  class="key">
						<label for="msd4">
							<?php echo 'Ssawa specjalna tył'; ?>
						</label>
					</td>
					<td>
					<?php if ( $form_edit ) { ?>
						<input type="text" name="msd4" id="msd4" class="inputbox" style="width:300px;" value="<?php echo $this->ob->get('msd4'); ?>" />
					<?php } else {  ?>
						<input type="text" name="msd4" id="msd4" class="inputbox" readonly="readonly" style="width:300px;" value="<?php echo $this->ob->get('msd4'); ?>" />
					 <?php } ?>
					</td>
				</tr>
			</table>
		</fieldset>
		</td>
		</tr>
	</table>
</fieldset>
<?php if ($this->ob->get('gid') && $delete) { ?>
	<fieldset class="adminform">
	<legend><?php echo 'Maszyna została usunięta'; ?></legend>
		<table class="admintable" cellspacing="1">
			<tr>
				<td class="key">
					<?php echo 'w dniu'; ?>
				</td>
				<td>
					<?php echo $this->ob->registerDate; ?>
				</td>
			</tr>			
			<tr>
				<td class="key">
					<?php echo 'przez'; ?>
				</td>
				<td>
					<?php echo $this->ob->whoRegister; ?>
				</td>
			</tr>	
		</table>
	</fieldset>
<?php } ?>
</tr>	
		</table>
	</fieldset>
	</div>
	<div class="clr"></div>

	<input type="hidden" name="gid" value="<?php echo $this->ob->get('gid'); ?>" />
	<input type="hidden" name="del" value="<?php echo $this->ob->get('del'); ?>" />
	<input type="hidden" name="option" value="com_maszyny" />
	<input type="hidden" name="task" value="" />
	<input type="hidden" name="max_file_size" value="64000000"> 
	<input type="hidden" name="file_path" value="<?php echo $this->ob->get('file_path'); ?>" />
	<input type="hidden" name="file_name" value="<?php echo $this->ob->get('file_name'); ?>" />
	<?php echo JHTML::_( 'form.token' ); ?>
</form>
